<template>
  <div>
    <el-container>
      <el-header>
        <h1 style="color:#fff;line-height:60px;float:left;display:inline-block">服装店销售管理系统</h1>
        <div style="float:right">
          <el-avatar icon="el-icon-user-solid" style="margin-top:10px;margin-right:50px"></el-avatar>
          <span style="color:#409EFF;float:right;margin-right:30px" @click="back">退 出</span>
          <p style="float:right;margin-top:1px;margin-right:40px">{{userName}},您好</p>
          <!-- <span style="color:#409EFF;float:right;margin-right:30px">退 出</span> -->
        </div>
      </el-header>
      <el-container>
        <Nav></Nav>
        <el-main style="line-height:0px">
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Nav from "../components/Nav";
import store from "../store";
export default {
  name: "Main",
  components: { Nav },
  data() {
    return {
      userName: store.state.userName
    };
  },
  methods: {
    back() {
      this.$router.push({
        path: "/"
      });
    }
  }
};
</script>

<style>
</style>